<link rel="stylesheet" type="text/css" href="__STATIC__mobile/mui/css/mui.min.css">
        <link rel="stylesheet" type="text/css" href="__STATIC__mobile/mui/css/iconfont.css">
<style>
body {
    font-family: 'Helvetica Neue',Helvetica,sans-serif;
    font-size: 17px;
    line-height: 0px;
    color: #000;
    background-color: #efeff4;
    -webkit-overflow-scrolling: touch;
}
h1, h2, h3, h4, h5, h6 {
     line-height: 1; 
     margin-top: 0px; 
     margin-bottom: 0px; 
}

 <?php if(!$is_mobile){  ?>

html, body {
    height: 100%;
    width: 50%;
    margin: 0 auto;
}
        <?php } ?>
</style>
<header class="mui-bar mui-bar-nav">
    <h1 class="mui-title">储蓄卡支付</h1>
</header>
<div class="mui-content">
<form id="form" action="/mobile/orderdetail/nocardPayCreate?order_sn=<?php echo get('order_sn');?>" class="mui-input-group">
	 <div class="mui-input-row">
	     <label>卡号</label>
	     <input type="tel" name="cardno" class="mui-input-clear"  maxlength="22" placeholder="请输入卡号" data-input-clear="5"><span class="mui-icon mui-icon-clear mui-hidden"></span>
	 </div>
      <div class="mui-input-row">
         <label>手机号</label>
         <input  type="tel" name="phone" class="mui-input-clear" maxlength="11" placeholder="请输入银行手机号" data-input-clear="5">
     </div>
     <!--  <div class="mui-input-row">
         <label>验证码</label>
         <input type="tel" name="validatecode" class="mui-input-clear" placeholder="请输入验证码" data-input-clear="5"><span class="mui-icon mui-icon-clear mui-hidden"></span>
     </div> -->
     <div class="mui-input-row">
         <label>姓名</label>
         <input type="text" name="name" class="mui-input-clear" placeholder="请输入姓名" data-input-clear="5"><span class="mui-icon mui-icon-clear mui-hidden"></span>
     </div>
      <div class="mui-input-row">
         <label>身份证</label>
         <input type="text" name="idcard" class="mui-input-clear" maxlength="18" placeholder="请输入身份证号" data-input-clear="5"><span class="mui-icon mui-icon-clear mui-hidden"></span>
     </div>
     <input type="hidden"  name="cardtype" value="01"/>
	 <div class="mui-button-row">
         <button type="button" class="mui-btn mui-btn-primary" onclick="createAjax()">提交</button>
    </div>
</form>
</div>
<script src="__STATIC__mobile/mui/js/mui.min.js"></script>
<script>
	mui.init({
		swipeBack: true //启用右滑关闭功能
	});
	function showCode(orderid){
		//var btnArray = ['确定','取消'];
		var btnArray = ['确定'];
		mui.prompt('', '请输入验证码', '验证码', btnArray, function(e) {
			if (e.index == 0) {
				console.log(e.value);
				var code = e.value;
				var url = '/mobile/orderdetail/nocardPay?orderid='+orderid+'&validatecode='+code;
				AjaxUrl(url);
			} else {
			}
		})
	}
	function createAjax(formId, post) {
		// 表单不存在 则直接返回
		if(!formId){
			var formId = "form";
		}
		if ($('#' + formId).length == 0) {
			return false;
		}
		var action = $('#' + formId).attr('action');
		if (!action) {
			action = location.href;
		}
		if (!post) {
			post = 'post';
		}
		$.ajax({
			url : action,
			type : post,
			data : $('#' + formId).serialize(),
			dataType : 'json',
		//	async : false,
			success : function(data) {
				//关闭正在加载
				layer.closeAll();//关闭所有
				
				if(data.url){
					var urls = data.url;
				}else{
					var urls = '';
				}

				if(data.ret == 0){
					// 成功
					//showsuccess(data.msg,urls);
					showCode(data.data);
				}else{
					// 失败
					showerror(data.msg,urls);
				}
			},
			beforeSend:function(){
				//正在加载
				layer.open({
			        type: 2,
			        shade: true,
			        shadeClose: false,
			    });
				
	       },
	       error: function() {
			   //关闭正在加载
	    	   layer.closeAll();//关闭所有
			   showerror("网络错误,请重试");
	       }
	       
		});
	}
</script>


<include file="Common:nav" />
